import request from '@/utils/request'

//商城管理-商品类目列表
export function listCategory(query){
    return request({
        url: '/category/list',
        method: 'get',
        params: query
    })
}


//商城管理-商品一级类目列表
export function listCatL1(){
    return request({
        url: '/category/l1',
        method: 'get',
    })
}


//商城管理-新增商品类目
export function createCategory(data){
    return request({
        url: '/category/create',
        method: 'post',
        data
    })
}

//商城管理-修改商品类目
export function updateCategory(data){
    return request({
        url: '/category/update',
        method: 'post',
        data
    })
}

//商城管理-删除商品类目
export function deleteCategory(data){
    return request({
        url: '/category/delete',
        method: 'post',
        data
    })
}


// 上传路径常量
const uploadPath = process.env.BASE_API + 'storage/create'
export { uploadPath }